/PROG  PNS0058
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "53322606C";
PROG_SIZE	= 3522;
CREATE		= DATE 15-08-11  TIME 19:34:04;
MODIFIED	= DATE 20-02-18  TIME 15:55:58;
FILE_NAME	= PNS0019;
VERSION		= 0;
LINE_COUNT	= 123;
MEMORY_SIZE	= 3974;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R34 ;
   6:  !  PROGRAM: PNS0058 ;
   7:  !  PART:53322606  ;
   8:  !ZYL15-8-11********************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14:CG SENSETIVE]=90    ;
  13:  R[18:PICK TIME BEFORE]=1    ;
  14:  R[19:DROP TIME BEFORE]=.2    ;
  15:   ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[1] ;
  23:  R[5:SPEED           ]=10    ;
  24:  OVERRIDE=R[5:SPEED           ] ;
  25:  !INITIATE TO PICK-POUNCE ;
  26:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  27:J P[2:PICK POUNCE] 50% CNT100 ACC100 BREAK    ;
  28:   ;
  29:  R[1:CYCLE TOTAL]=0    ;
  30:  TIMER[1]=RESET ;
  31:  TIMER[1]=START ;
  32:   ;
  33:  LBL[10:TOP OF LOOF] ;
  34:  OVERRIDE=R[5:SPEED           ] ;
  35:   ;
  36:  TIMER[3]=STOP ;
  37:  TIMER[2]=STOP ;
  38:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  39:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  40:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  41:  R[8:R MOVE TIME]=TIMER[3]    ;
  42:  TIMER[2]=RESET ;
  43:  TIMER[2]=START ;
  44:  TIMER[3]=RESET ;
  45:   ;
  46:  !PROCEED TO PICK ;
  47:  LBL[20] ;
  48:  IF DI[1:P3 PICK ENTRY OK]=ON AND DI[3:FROM R23 CLEAR]=ON AND DI[8:P3 PICK START]=ON,JMP LBL[25] ;
  49:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  50:  JMP LBL[20] ;
  51:   ;
  52:  LBL[25] ;
  53:  WAIT DI[1:P3 PICK ENTRY OK]=ON AND DI[3:FROM R23 CLEAR]=ON AND DI[8:P3 PICK START]=ON    ;
  54:  R[5:SPEED           ]=100    ;
  55:  TIMER[3]=START ;
  56:  OVERRIDE=R[5:SPEED           ] ;
  57:J P[3:PICK APPROACH] 100% CNT40 ACC100    ;
  58:   ;
  59:J P[4:PICK] 90% CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  60:  PAYLOAD[2] ;
  61:  CALL CHK_PICK    ;
  62:  MONITOR Z_CHECH ;
  63:J P[5:PICK DEPART] 90% CNT10 ACC100 TA R[20]sec,DO[5:TO R23 DROP START]=PULSE,1.0sec    ;
  64:  DO[8:P3 PARTS OUT]=PULSE,1.0sec ;
  65:  LBL[27] ;
  66:  CALL CHECKPICK    ;
  67:  IF DI[9:VACUUM ON L]=OFF OR DI[11:VACUUM ON R]=OFF,JMP LBL[27] ;
  68:L P[6] 3000mm/sec CNT100    ;
  69:J P[7:PICK CLEAR] 100% CNT100 ACC100    ;
  70:   ;
  71:   ;
  72:  LBL[30:GOTO DROP POUNCE] ;
  73:J P[8:DROP POUNCE] 100% CNT80 ACC100    ;
  74:   ;
  75:  TIMER[3]=STOP ;
  76:  LBL[40:AT DROP POUNCE] ;
  77:  IF DI[2:P4 DROP ENTRY]=ON AND DI[4:FROM R45 CLEAR]=ON AND DI[5:P4 DROP START]=ON,JMP LBL[80] ;
  78:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P4 DROP ENTRY]=ON,JMP LBL[50] ;
  79:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
  80:  JMP LBL[40] ;
  81:   ;
  82:  LBL[50:MOVE DROP SNEAK] ;
  83:  TIMER[3]=START ;
  84:  OVERRIDE=R[5:SPEED           ] ;
  85:J P[9:DROP SNEAK] 90% CNT100 ACC100    ;
  86:  LBL[51:DROP OR C-P-S] ;
  87:  IF DI[2:P4 DROP ENTRY]=ON AND DI[4:FROM R45 CLEAR]=ON AND DI[5:P4 DROP START]=ON,JMP LBL[80] ;
  88:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
  89:  JMP LBL[51] ;
  90:  JMP LBL[50] ;
  91:   ;
  92:  LBL[60:MOVE CLS-PRS-ACC] ;
  93:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  94:  PAUSE ;
  95:  JMP LBL[30] ;
  96:   ;
  97:  LBL[80:DROP ENABLED] ;
  98:  TIMER[3]=START ;
  99:  !PROCEED TO DROP ;
 100:  OVERRIDE=R[5:SPEED           ] ;
 101:J P[14:DROP LIMIT] 90% CNT100    ;
 102:L P[10:DROP APPROACH] 2500mm/sec CNT20 ACC100    ;
 103:  MONITOR END Z_CHECH ;
 104:L P[11:DROP] 2000mm/sec CNT5 TB R[19]sec,CALL PARTDROP ACC100 BREAK    ;
 105:  DO[6:PART DROP COMPLETE]=PULSE,1.0sec ;
 106:  PAYLOAD[1] ;
 107:  CALL CHK_DROP    ;
 108:   ;
 109:J P[12:DROP DEPART] 100% CNT80 ACC110 TA    .01sec,DO[7:PRESS STAMPING START]=PULSE,1.0sec    ;
 110:J P[13:DROP CLEAR] 100% CNT100 ACC110    ;
 111:  !GOTO PICK POUNCE ;
 112:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 113:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 114:  JMP LBL[10] ;
 115:   ;
 116:  LBL[90:END OF CYCLE] ;
 117:  TIMER[1]=STOP ;
 118:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 119:  MONITOR END MON_PICK ;
 120:J P[1:MIDDLE] 50% CNT100    ;
 121:  MOVE TO HOME    ;
 122:   ;
 123:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.456  mm,	Y =     -.007  mm,	Z =  -932.000  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3071.042  mm,	Y =  1378.062  mm,	Z = -1002.521  mm,
	W =   179.988 deg,	P =     -.126 deg,	R =   101.186 deg,
	E1=   111.261 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2700.190  mm,	Y =  3273.841  mm,	Z =  -999.116  mm,
	W =  -179.897 deg,	P =     -.655 deg,	R =    88.965 deg,
	E1=   106.316 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2685.379  mm,	Y =  3262.956  mm,	Z = -1162.454  mm,
	W =  -179.253 deg,	P =     -.164 deg,	R =    88.960 deg,
	E1=   106.316 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2685.380  mm,	Y =  3262.956  mm,	Z =  -968.615  mm,
	W =  -179.253 deg,	P =     -.164 deg,	R =    88.960 deg,
	E1=   106.316 deg
};
P[6]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2696.236  mm,	Y =  2528.584  mm,	Z =  -960.950  mm,
	W =   178.922 deg,	P =      .097 deg,	R =    88.957 deg,
	E1=   106.316 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2057.813  mm,	Y =  1509.648  mm,	Z =  -961.037  mm,
	W =   179.663 deg,	P =     -.281 deg,	R =   145.096 deg,
	E1=   107.122 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2132.785  mm,	Y =  -887.167  mm,	Z =  -947.512  mm,
	W =   178.345 deg,	P =     -.262 deg,	R =  -143.578 deg,
	E1=   114.366 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,	
	J1=    -9.318 deg,	J2=   -28.619 deg,	J3=    53.368 deg,
	J4=    -1.762 deg,	J5=   -55.196 deg,	J6=   258.249 deg,
	E1=   117.563 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2630.051  mm,	Y = -3220.237  mm,	Z =  -913.995  mm,
	W =   171.392 deg,	P =      .573 deg,	R =   -90.428 deg,
	E1=   105.803 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2630.049  mm,	Y = -3220.237  mm,	Z = -1163.431  mm,
	W =   171.392 deg,	P =      .573 deg,	R =   -90.428 deg,
	E1=   105.803 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2630.051  mm,	Y = -3220.237  mm,	Z = -1021.035  mm,
	W =   171.392 deg,	P =      .573 deg,	R =   -90.428 deg,
	E1=   105.803 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2128.448  mm,	Y = -1226.102  mm,	Z =  -985.848  mm,
	W =   179.233 deg,	P =    -2.973 deg,	R =  -151.331 deg,
	E1=   105.186 deg
};
P[14:"DROP LIMIT"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2633.176  mm,	Y = -1702.567  mm,	Z =  -921.346  mm,
	W =   177.910 deg,	P =     1.009 deg,	R =  -112.116 deg,
	E1=   117.563 deg
};
/END
